<?php
/*
*To change this license header, choose License Headers in Project Properties.
*To change this template file, choose Tools | Templates
*and open the template in the editor.
*/
require("db_conn.php"); //包含连接文件
$sql="SELECT * FROM 'tb_ad'where isshow=1 order by id desc limit 0,5"; //写查询语句 isshow=1 取五个
$adrs=$db->query($sql); //执行语句 $rs是一个结果集
$adrows=$adrs->fetch_all(MYSQLI_BOTH); 
require 'index_html.php';
//释放结果集

$result->free();

//关闭数据库

$db->close();

